import type {AIMessage} from "@/types/entity/AIMessage";
import request from "@/utils/request";

/**
 * 获取AI对话
 * @param {object} params messages
 * @param {string} params.content
 * @param {array} params.contents
 * @param {string} params.name
 * @param {string} params.role
 * @param {string} params.toolCallId
 * @param {array} params.toolCalls
 * @returns
 */
export function getAiResponseService(params:AIMessage[]) {
  return request.post<EventSource>(`/v1/ai/answer`, params);
}
